class CreateTemplates < ActiveRecord::Migration
  def self.up
    create_table :templates do |t|
      t.column :title, :string
      t.column :filename, :string
      t.column :preview, :string
    end

    create_table :images_templates, :id => false do |t|
      t.column :image_id, :integer
      t.column :template_id, :integer
    end
  end

  def self.down
    drop_table :templates
    drop_table :images_templates
  end
end
